import operate from '@dfeidao/atom-nodejs/db/operate';
// import sys_date from '@dfeidao/atom-nodejs/msg/sys-date';
import { systemid } from '../atom/config';
interface Message {
	obj: {};
	teacher_no: string;
	productid: string;
	username: string;
}

export default async function atom(msg: Message, action_id: string, session_id: string) {
	// const time = await sys_date(action_id, session_id);
	const { exec, update } = await operate(action_id, session_id, systemid);
	update('teacher', { teacher_no: msg.teacher_no, productid: msg.productid }, msg.obj);
	// insert('operation_record', {
	// 	// operator_no: msg.usercode,
	// 	// operator: msg.username,
	// 	operate_type: '修改',
	// 	op_cont: `“${msg.username}”在[基本信息]页面“修改”了一条编号为“${msg.teacher_no}”的数据`,
	// 	op_time: time,
	// 	productid: msg.productid,
	// 	operation_page: '基本信息'
	// });
	const res = await exec();
	return res;
}
